package com.swak.rpc.config;

import java.io.Serializable;

import javax.annotation.PostConstruct;

import com.swak.rpc.config.context.ConfigManager;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * abstract Config.
 * 
 * @author lifeng
 */
@Getter
@Setter
@Accessors(chain = true)
public abstract class AbstractConfig implements Serializable {
	private static final long serialVersionUID = 1L;
	protected String id;

	@PostConstruct
	public void addIntoConfigManager() {
		ConfigManager.getInstance().addConfig(this);
	}
}